package com.clwl.supervise.superviseapp.mapper.risk;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clwl.supervise.superviseapp.entity.base.CommonSearchEntity;
import com.clwl.supervise.superviseapp.entity.risk.JgRiskLevel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface JgRiskLevelMapper extends BaseMapper<JgRiskLevel> {

    Long selectCompanyCount(@Param("params") CommonSearchEntity params);

    IPage<Map<String, Object>> selectCompanyList(IPage<Map<String, Object>> iPage,@Param("params") CommonSearchEntity params);

    /**
     *
     * @param companyId 企业id
     * @param year  查询企业
     * @param deleteFlag  传递null是 ！=1
     * @return
     */
    JgRiskLevel selectByCompanyId(@Param("companyId") Long companyId, @Param("year") String year, @Param("deleteFlag") String deleteFlag);
    /**
     *
     * @param companyId 企业id
     * @param deleteFlag  传递null是 ！=1
     * @return
     */
    List<JgRiskLevel> selectListByCompanyId(@Param("companyId") Long companyId,  @Param("deleteFlag") String deleteFlag);

    JgRiskLevel selectByCompanyIdAndInDelete(@Param("companyId") Long companyId, @Param("year") String year, @Param("deleteFlag") String deleteFlag);
}